package com.caiyi.financial.nirvana.sms.api;

import com.caiyi.financial.nirvana.sms.param.QueryReportParam;
import com.youyu.common.api.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.Map;

/**
 * 接收通知相关接口
 */
@Api(description = "接收通知接口")
@RequestMapping("/com/caiyi/financial/nirvana/sms/api/notify")
@FeignClient(name = "sms-frontend")
public interface SmsNotifyApi {


    @ApiOperation("接收状态报告通知")
    @ApiImplicitParam(name = "body", value = "回调参数", dataType = "String", paramType = "form")
    @RequestMapping(value = "/{gatewayId}", method = {RequestMethod.POST, RequestMethod.GET})
    public String status(@RequestParam Map<String, String> formData, @PathVariable("gatewayId") Integer gatewayId);


    @ApiOperation("主动回调状态报告")
    @ApiImplicitParam(name = "param", value = "主动回调状态报告", required = true, dataType = "QueryReportParam", paramType = "body")
    @RequestMapping(value = "/queryReport", method = {RequestMethod.POST, RequestMethod.GET})
     Result queryReport(@RequestBody QueryReportParam param);

}
